﻿using System;
using ComponentFactory.Krypton.Toolkit;

namespace RaGE_JD
{
    public partial class MainWindow : KryptonForm
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void InitTab(object sender, EventArgs e)
        {
            TabFlag = MainNav.SelectedPage.TabIndex;

            switch (TabFlag)
            {
                case AIPolicyTab:
                    TabFlag = AIPolicyTab;
                    comboDecimal.Visible = true;
                    InitAIPolicy();
                    break;

                case NPCGenTab:
                    comboDecimal.Visible = false;
                    TabFlag = NPCGenTab;
                    InitNPCGen();
                    break;

                case TasksTab:
                    TabFlag = TasksTab;
                    comboDecimal.Visible = false;
                    break;

                case ElementsTab:
                    TabFlag = ElementsTab;
                    comboDecimal.Visible = false;
                    break;

                case GShopTab:
                    TabFlag = GShopTab;
                    comboDecimal.Visible = false;
                    break;

                case PathTab:
                    TabFlag = PathTab;
                    comboDecimal.Visible = false;
                    break;

                case MapTab:
                    TabFlag = MapTab;
                    comboDecimal.Visible = false;
                    break;

                case PWAdminTab:
                    TabFlag = PWAdminTab;
                    comboDecimal.Visible = false;
                    break;
            }
        }
        
        private void FileExitMenuClick(object sender, EventArgs e)
        {
            Close();
        }

        private void ToolStripQExitClick(object sender, EventArgs e)
        {
            Close();
        }

        private void FileOpenMenuClick(object sender, EventArgs e)
        {
            switch (TabFlag)
            {
                //*************************************************************
                //**                      AIPolicy Editor                    **
                //*************************************************************

                case AIPolicyTab:

                    OpenAIPolicy();

                    break;

                //*************************************************************
                //**                       NPCGen Editor                     **
                //*************************************************************

                case NPCGenTab:

                    OpenNPCGen();

                    break;

                //*************************************************************
                //**                       Tasks Editor                      **
                //*************************************************************

                case TasksTab:

                    break;

                //*************************************************************
                //**                     Elements Editor                     **
                //*************************************************************

                case ElementsTab:

                    break;

                //*************************************************************
                //**                       GShop Editor                      **
                //*************************************************************

                case GShopTab:

                    break;

                //*************************************************************
                //**                        Path Editor                      **
                //*************************************************************

                case PathTab:

                    OpenPath();

                    break;

                //*************************************************************
                //**                        Map Editor                       **
                //*************************************************************

                case MapTab:

                    break;

                //*************************************************************
                //**                         PCK Tools                       **
                //*************************************************************

                case PCKToolsTab:

                    break;

                //*************************************************************
                //**                         PW Admin                        **
                //*************************************************************

                case PWAdminTab:

                    break;

                //*************************************************************
                //**                        Misc Tools                       **
                //*************************************************************
                case MiscTab:

                    break;
            }
        }

        private void ToolBarOpenClick(object sender, EventArgs e)
        {
            FileOpenMenuClick(sender, e);
        }

        private void FileSaveMenuClick(object sender, EventArgs e)
        {
            switch (TabFlag)
            {
                //*************************************************************
                //**                      AIPolicy Editor                    **
                //*************************************************************

                case AIPolicyTab:

                    SaveAIPolicy();

                    break;

                //*************************************************************
                //**                       NPCGen Editor                     **
                //*************************************************************

                case NPCGenTab:

                    SaveNPCGen();

                    break;

                //*************************************************************
                //**                       Tasks Editor                      **
                //*************************************************************

                case TasksTab:

                    break;

                //*************************************************************
                //**                     Elements Editor                     **
                //*************************************************************

                case ElementsTab:

                    break;

                //*************************************************************
                //**                       GShop Editor                      **
                //*************************************************************

                case GShopTab:
                    break;

                //*************************************************************
                //**                        Path Editor                      **
                //*************************************************************

                case PathTab:

                    SavePath();

                    break;

                //*************************************************************
                //**                        Map Editor                       **
                //*************************************************************

                case MapTab:

                    break;

                //*************************************************************
                //**                         PCK Tools                       **
                //*************************************************************

                case PCKToolsTab:

                    break;

                //*************************************************************
                //**                         PW Admin                        **
                //*************************************************************

                case PWAdminTab:

                    break;

                //*************************************************************
                //**                        Misc Tools                       **
                //*************************************************************
                case MiscTab:

                    break;
            }
        }

        private void ToolBarSaveClick(object sender, EventArgs e)
        {
            FileSaveMenuClick(sender, e);
        }

        private void MainWindowLoad(object sender, EventArgs e)
        {
            comboDecimal.SelectedIndex = 0;
            bDecimal = true;
            comboDecimal.Visible = true;
            InitAIPolicy();
            InitNPCGen();
        }

        private void BtnAsstGetValuesClick(object sender, EventArgs e)
        {

        }

        private void BtnNPCSearchClick(object sender, EventArgs e)
        {

        }

        
        
    }
}